<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/12/19
 * Time: 13:01
 */
namespace app\api\controller\v1;

use app\api\model\Type as TypeModel;

class Type {

    public function addType (){
        $name = input('param.name');
        $res = TypeModel::create(['name'=>$name]);
        if($res){
            return show(0,'添加成功',[]);
        }else {
            return show(400,'添加失败',[]);
        }
    }
}